<?php

/**
 *Simple CRUD Code Generator
 *Email:  support@crazedcoders.com
 *Website: http://www.crazedcoders.com/
 *Copyright (C) 2007 CrazedCoders
 *
 *This program is free software: you can redistribute it and/or modify
 *it under the terms of the GNU General Public License as published by
 *the Free Software Foundation, either version 3 of the License, or
 *(at your option) any later version.
 *
 *THE PROGRAM IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *SOFTWARE.
 *
 *You should have received a copy of the GNU General Public License
 *along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

	// for some reason I can't write to con.php, so i named this file con2.php
class con {
	static $MARKER_STRING = "MARKERu32897";

	static $package;
	# convert package to relative path
	static $packagePath;// = str_replace( '.', '/', $package );
	#echo "packagePath: $packagePath;";
	#echo "package: $package;";
	static $relativePath;// = $relativeRoot."/".$packagePath;
	static $absolutePath;
	/*foreach( split( "\.", $package ) as $tmp1=>$tmp2) {
			$relativeVoPath .= "../";
	}*/
	static $relativeVoPath;// .= $relativeRoot."/vo/".$packagePath;
	static $absoluteVoPath;

	static $relativeFlexPath;// = $relativeRoot."/".$packagePath."/flex/".$packagePath;
	static $absoluteFlexPath;
	static $relativeFlexSrcPath;
	static $absoluteFlexSrcPath;
	static $relativeFlexRootPath;
	static $absoluteFlexRootPath;
	static $relativeFlexVoPath;// = $relativeFlexPath."/vo/";
	static $absoluteFlexVoPath;

	static $tables; // holds all tables
	/* structure is as follows

	tables > array							// holds arbitrary # tables
	 |
	 \-key:"table1" > array					// hold arbitrary # columns
	    |
	    |-key:"isManyToMany" > boolean		// tells you whether this table is
		|									// only a mapping table
	    |-key:0 > array						// holds one column
	    |  |
	    |  |-key:0 > "column1"				// column name
	    |  |-key:1 > "int"					// column data_type
	    |  |-key:2 > array					// holds primary of foreign key
		|  |  |								// information and is not present
		|  |  |								// for columns that do not have
		|  |  |								// primary or
		|  |  |								// foreign keys
	    |  |  |
	    |  |  |-key:"table_name"			// holds the table name (duplicate)
	    |  |  |-key:"column_name"			// holds the column name(duplicate)
	    |  |  |-key:"data_type"				// holds the data type  (duplicate)
	    |  |  |-key:"constraint_type"		// holds the constraint type either
	    |  |  |									// "PRIMARY KEY"
	    |  |  |									//or "FOREIGN KEY"
	    |  |  |-key:"referenced_table_name"	// for foreign keys shows the table
	    |  |  |								// name of the referenced table
	    |  |  \-key:"referenced_column_name"// for foreign keys shows the
	    |  |  								// column name being referenced
		|  |
		|  \-key:3 > array					// this array holds arbitrary #
		|     |								// columns that
		|     |								// references this column
		|     |								// ie. referenced_table_name and
		|     |								// and referenced_column_name
		|     |								// match this column
		|     |
		|     \-key:1 > array				// same structure as
		|        |							// tables['table1][0][2]
		|        |-key:"table_name"
		|        |-key:"column_name"
		|        |-key:"data_type"
		|        |-key:"constraint_type"
		|        |-key:"referenced_table_name"
		|        \-key:"referenced_column_name"
		|
		|
		|
		|
	    \-key:1 > array						// holds another column without
		   |								// primary or foreign keys
	       |
	       |-key:0 > "column2"
	       \-key:1 > "varchar"

	 */
	static $manyToMany; // tables which are only used for mapping
	static $manyToOne; // tables that are being referenced

	static $dbtype; // 'mysql' or 'mssql' are currently acceptable
	static $dbname; // database to use for database
	static $dbuser; // username to use for database
	static $dbpass; // password to use for database
	static $dbhost; // hostname to use for database

}

?>
